From 3ed2ca517aa5f2424f238817844d8a8eb98e64c2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 15 Dec 2023 15:47:58 +0000 Subject: Implement int ops in runtime --- ...ng.compiler.testing.snapshots.Snapshotter)].expected | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index d41b1648..e0d7c0f6 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -18,12 +18,17 @@ Compilation unit elements: params=() return-type=void ) +( + function-decl + "shed__runtime__int_create" + params=((param "value" int)) + return-type=int +) Locals: * (val "tmp__0" int) * (val "effectHandler__0" data-ptr) * (val "int__0" int) - * (val "intPointer__0" data-ptr) * (val "tmp__1" int) Instructions: @@ -52,15 +57,7 @@ Instructions: ( block ( - (alloc-heap (local "intPointer__0") (struct (int))) - ( - memory-store - pointer=(local "intPointer__0") - layout=(struct (int)) - offset=(0) - value=(int 42) - ) - (data-ptr-to-int (local "int__0") (local "intPointer__0")) + (call (local "int__0") "shed__runtime__int_create" ((int 42))) (call _ "shed__runtime__effects_pop_handler" ()) ) results=((local "int__0")) -- cgit v1.2.3